﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint.WebPartPages;

namespace DevSky.WebParts.YouTube
{
    public partial class YouTubeCarousel : IYouTubeToolpartSettings
    {
        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public string ChannelName { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public string VideoLink { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public string ChannelVideoLink { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool ShowVideoSelection { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool IFrameEmbedding { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public string VideoWidth { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public string VideoHeight { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool UseSSL { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool ShowSimilarVideos { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool AllowFullScreen { get; set; }

        [Personalizable(PersonalizationScope.Shared)]
        [WebBrowsable(false)]
        public bool ShowOnlySpecifiedVideos { get; set; }

        #region TOOLPARTS
        public override ToolPart[] GetToolParts()
        {
            List<ToolPart> toolParts = new List<ToolPart>(base.GetToolParts());

            YouTubeVideoToolPart youtubeVideo = new YouTubeVideoToolPart("YouTube video information") { ID = "YouTubeVideoInfo" };
            toolParts.Add(youtubeVideo);

            return toolParts.ToArray();
        }
        #endregion
    }
}
